#ifndef TABLESCOREWIDGET_H
#define TABLESCOREWIDGET_H

#include <QTableWidget>
#include <QHeaderView>
#include "connectionplayer.h"


class TableScoreWidget : public QTableWidget
{
    Q_OBJECT
public:
    TableScoreWidget(QWidget* parent = 0);

    void addRow(QString nick, qint16 score);
    void updateTable();
public slots:
    void addPlayer(ConnectionPlayer* player);
    void removePlayer(ConnectionPlayer* player);
    void removePlayerById(qint32 id);
    void clearPlayers();

private:
    QVector<ConnectionPlayer*> playerList;

};

#endif // TABLESCOREWIDGET_H
